package com.abiao.shop.exception;

import com.abiao.shop.result.CodeMsg;

/**
 * @Description: GlobalException
 * 全局业务异常，用于返回给用户，返回CodeMsg中的错误信息，异常捕获处理见同目录全局异常拦截器
 * @Author: AB
 * @Date: 2021-07-15
 * @Version:v1.0
 */

public class GlobalException extends RuntimeException {
    private static final long serialVersionUid = 1L;
    private final CodeMsg cm;

    public GlobalException(CodeMsg cm){
        super(cm.toString());
        this.cm = cm;
    }

    public CodeMsg getCm() {
        return cm;
    }
}
